Other Classes

The following classes are available globally.

  • A Cancellable object that automatically cancels on deinit.

    Any resources referred by AnyCancelable will be released after cancellation.

    This class has similar behavior to Combine.AnyCancellable, but doesn’t require iOS 13.

    See more

    Declaration

    Swift

    public class AnyCancelable : Cancelable
    extension AnyCancelable: Hashable
  • MapboxRecorder provides functions to record and replay API calls of a MapboxMap instance. These recordings can be used to debug issues which require multiple steps to reproduce. Additionally, playbacks can be used for performance testing custom scenarios.

    Note

    The file format produced by MapRecorder is experimental and there is no guarantee for version cross-compatibility. The set of recorded APIs and their parameters might change in future releases.
    See more

    Declaration

    Swift

    @_spi(Experimental)
    public final class MapRecorder
  • Style provides access to the APIs used to dynamically modify the map’s style. Use it to read and write layers, sources, and images. Obtain the Style instance for a MapView via MapView.mapboxMap.style.

    Important

    Style should only be used from the main thread.
    See more

    Declaration

    Swift

    public class StyleManager
  • Viewport provides a structured approach to organizing camera management logic into states and transitions between them.

    At any given time, the viewport is either:

    See more

    Declaration

    Swift

    public final class ViewportManager